<!-- 列表 -->
<template>
	<view class="container">
		<view class="list">
			<view class="list-item" v-for="(item, index) in list" :key="index">
				<view class="icon-box">
					<image class="icon" :src="item.icon" mode="widthFix"></image>
				</view>
				<view class="content border-bottom-1px">
					<text class="label">{{item.label}}</text>
					<text class="right-icon iconfont">&#xe61a;</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script setup>
	const list = [
		{ label: '店铺设置', icon: '/pagesB-shop-center/static/images/shop.svg' },
		{ label: '地址管理', icon: '/pagesB-shop-center/static/images/address.svg' },
		{ label: '发票管理', icon: '/pagesB-shop-center/static/images/invoice.svg' },
		{ label: '银行卡管理', icon: '/pagesB-shop-center/static/images/bank-card.svg' },
	]
</script>

<style lang="scss" scoped>
	.container {
		padding: 25rpx;
	}

	.list {
		background: #FFFFFF;
		border-radius: 20rpx;

		&-item {
			display: flex;
			height: 100rpx;
			
			&:last-child {
				.content::after {
					display: none;
				}
			}
			
			&:active {
				background-color: #fafafa;
			}

			.icon-box {
				flex-shrink: 0;
				display: flex;
				align-items: center;
				justify-content: center;
				width: 70rpx;
				height: 100%;
				
				.icon {
					width: 32rpx;
				}
			}
			
			.content {
				flex-grow: 1;
				display: flex;
				justify-content: space-between;
				align-items: center;
				height: 100%;
				
				&::after {
					background-color: #E5E5E5;
				}
				
				.label {
					font-size: 28rpx;
					color: #222222;
				}
				
				.right-icon {
					font-size: 24rpx;
					color: #222222;
					margin-right: 10rpx;
				}
			}
		}
	}
</style>